﻿using Microsoft.ApplicationBlocks.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DevExpressWebApplication1.Utils
{
    public class CategoryUtils
    {
        public static Boolean Insert(string category_name, string Description)
        {
            int id = SqlHelper.ExecuteNonQuery(DataServices.ConnectString, "sp_Category_Insert", category_name, Description);
            bool isSuccess = false;
            if (id > 0)
                isSuccess = true;
            return isSuccess;
        }

        public static Boolean Update(int category_id, string category_name, string Description)
        {
            int id = SqlHelper.ExecuteNonQuery(DataServices.ConnectString, "sp_Category_Update", category_id, category_name, Description);
            bool isSuccess = false;
            if (id > 0)
                isSuccess = true;
            return isSuccess;
        }
    }
}